/*
 * parliament.cpp
 *
 *  Created on: 2012-5-15
 *      Author: jawinton
 */




#include <stdio.h>

#define SIZE 1000

int main (void) {
	int n, arr[SIZE];
	while (~scanf("%d", &n)) {
		int sum = 0, i;
		for (i=2; (sum + i) < n; i++) {
			arr[i-1] = i;
			sum += i;
		}
		sum += i;
		arr[i-1] = i;
		arr[0] = i - 1;
		if (sum == n) {
			for (i = 1; i <= arr[0]; i++) printf("%d ", arr[i]);
			printf("\n");
		}
		if ((sum - n) == 1){
			for (i = 2; i < arr[0]; i++) printf("%d ", arr[i]);
			printf("%d ", arr[i] + 1);
			printf("\n");
		}
		if ((sum - n) >= 2){
			for (i = 1; i <= arr[0]; i++) {
				if ((sum - n) != arr[i]) printf("%d ", arr[i]);
			}
			printf("\n");
		}
	}
}
